﻿namespace SPRING.Class
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.CompilerServices;

    [Serializable]
    public class Shareholder
    {
        public Shareholder()
        {
        }

        public Shareholder(int nodeid, int parentId, string Stype, string Sname, string SNationality, double SshareRate)
        {
            this.SHId = nodeid;
            this.SHparentId = parentId;
            this.SHtype = Stype;
            this.SHname = Sname;
            this.SHNationality = SNationality;
            this.SHshareRate = SshareRate;
        }

        public static Shareholder GetShareHolderById(List<Shareholder> objshareholders, int nodeid)
        {
            return objshareholders.Find(objCurr => objCurr.SHId.Equals(nodeid));
        }

        public int SHId { get; set; }

        public string SHname { get; set; }

        public string SHNationality { get; set; }

        public int SHparentId { get; set; }

        public double SHshareRate { get; set; }

        public string SHtype { get; set; }
    }
}

